import React, { Component } from 'react'
import { Image } from 'antd-mobile'
import style from "./index.module.scss"
import {getSecondsListApi}from"@/api/goods"
// const demoSrc =

export default class index extends Component {
  state = {
    list: []
  }
  componentDidMount(){
    this.getSeconds()
  }
  async getSeconds(){
    let res=await getSecondsListApi()
    // console.log(res);
    if(res.data.code===200){
      this.setState({
        list:res.data.list
      })
    }
  }
  render() {
    return (
      // <div></div>
      <ul className={style.secondslist}>
        {this.state.list.map((item,index) => (
          <li key={index} className={style.secondslistli}>
            <Image
              src={item.pic}
              width={60}
              height={60}
              fit='cover'
              style={{ borderRadius: 30 }}
            />
            <span>{item.name}</span>
          </li>
        ))}
      </ul>
    )
  }
}
